import HTTP from '@/http/http'
const centerApi = import.meta.env.VITE_BASE_URL

class Api extends HTTP {
  // 下载格点天气专报未来10天PDF文件
  downLoadForecastPDF(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/forecast/downLoadForecastPDF`,
      params,
      responseType: 'blob'
    })
  }
  // 获得逐n时间轴及对应预报色斑图地址
  getTimerShaftAndchoroplethicMap(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/forecast/getTimerShaftAndchoroplethicMap`,
      params
    })
  }
  // 获得格点未来10天长期全要素预报报表
  getFuture10DayReport(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/forecast/getFuture10DayReport`,
      params
    })
  }
  // 获得格点某要素24小时内逐小时短期预报曲线趋势图
  getElementHourCurve(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/forecast/getElementHourCurve`,
      params
    })
  }
  // 查询市级信息
  getCityList(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/area/getCityList`,
      params
    })
  }
  // 查询县区级信息
  getCountyList(params?: any) {
    return this.request({
      method: 'get',
      url: `${centerApi}/area/getCountyList`,
      params
    })
  }
}
export default new Api()
